using System;
using System.IO;
using System.Web;

namespace WebMonitor.Http.Impl {
    public class HttpServerUtilityAdapter : IHttpServerUtility {
        private readonly HttpServerUtility server;

        public HttpServerUtilityAdapter(HttpServerUtility server) {
            this.server = server;
        }

        public object CreateObject(string progID) {
            return server.CreateObject(progID);
        }

        public object CreateObject(Type type) {
            return server.CreateObject(type);
        }

        public object CreateObjectFromClsid(string clsid) {
            return server.CreateObjectFromClsid(clsid);
        }

        public string MapPath(string path) {
            return server.MapPath(path);
        }

        public Exception GetLastError() {
            return server.GetLastError();
        }

        public void ClearError() {
            server.ClearError();
        }

        public void Execute(string path) {
            server.Execute(path);
        }

        public void Execute(string path, TextWriter writer) {
            server.Execute(path, writer);
        }

        public void Transfer(string path, bool preserveForm) {
            server.Transfer(path, preserveForm);
        }

        public void Transfer(string path) {
            server.Transfer(path);
        }

        public string HtmlDecode(string s) {
            return server.HtmlDecode(s);
        }

        public void HtmlDecode(string s, TextWriter output) {
            server.HtmlDecode(s, output);
        }

        public string HtmlEncode(string s) {
            return server.HtmlEncode(s);
        }

        public void HtmlEncode(string s, TextWriter output) {
            server.HtmlEncode(s, output);
        }

        public string UrlEncode(string s) {
            return server.UrlEncode(s);
        }

        public string UrlPathEncode(string s) {
            return server.UrlPathEncode(s);
        }

        public void UrlEncode(string s, TextWriter output) {
            server.UrlEncode(s, output);
        }

        public string UrlDecode(string s) {
            return server.UrlDecode(s);
        }

        public void UrlDecode(string s, TextWriter output) {
            server.UrlDecode(s, output);
        }

        public string MachineName {
            get { return server.MachineName; }
        }

        public int ScriptTimeout {
            get { return server.ScriptTimeout; }
            set { server.ScriptTimeout = value; }
        }
    }
}